<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>MyPetstore</title>
</head>
<body>
<div th:replace="common/top"></div>
<div id="BackLink">
    <a href="/catalog/view" class>Return to Main Menu</a>
</div>
<div id="Content">
    <div id="Catalog">
        <table class="rwd-table">
            <tr>
                <td th:utext="${item.product.description}"></td>
            </tr>
            <tr>
                <td><b th:text="${item.itemId}"></b></td>
            </tr>
            <tr>
                <td><b th:text="${item.attribute1} + ' ' + ${item.product.name}"></b></td>
            </tr>
            <tr>
                <td th:text="${item.product.name}"></td>
            </tr>
            <tr>
                <td th:if="${item.stockQuantity} gt '0'">
                    <span th:text="${item.stockQuantity} + ' in stock'"></span>
                </td>
                <td th:if="${item.stockQuantity} le '0'">
                    Back ordered.
                </td>
            </tr>
            <tr>
<!--                    <fmt:formatNumber value="${sessionScope.item.listPrice}"-->
<!--                                      pattern="$#,##0.00" />-->
                <td th:text="'$' + ${item.listPrice}">
            </tr>

            <tr>
                <td>
                    <a class="btn" th:href="@{/cart/addItemToCart(workingItemId=${item.itemId})}">Add to Cart</a>
                </td>
            </tr>
        </table>

    </div>
</div>
<div th:replace="common/bottom"></div>
</body>
</html>